package com.guomao.demos;

import com.guomao.entity.Student;

import java.util.TreeSet;

public class CollectionDemoK {

    public static void main(String[] args) {

        TreeSet<Student> s = new TreeSet<>();


        Student bob = new Student("bob", 20);
        Student kevin = new Student("kevin", 19);
        Student ruiwen = new Student("ruiwen", 19);
        Student alice = new Student("alice", 19);

        s.add(bob);
        s.add(kevin);
        s.add(ruiwen);
        s.add(alice);


        System.out.println(s);//

    }
}
